module.exports = {
  addPPT: `INSERT INTO ppt(id, user_id, title, intro, content, cover, tag) 
              VALUES(0, ?, ?, ?, ?, ?, ?)`,
  delPPT: 'DELETE FROM ppt WHERE id=? AND user_id=?',
  findPPTPage: `SELECT id, user_id, title, intro, content->'$[0]' as content, cover, tag, create_time, update_time FROM ppt
               WHERE user_id=? AND title REGEXP ? AND (JSON_CONTAINS(tag->'$', ?) OR '@@@***###$$$&&&leazerfspace20220509'=?) ORDER BY update_time DESC LIMIT ?,?`,
  findPPT: `SELECT count(id) as total FROM ppt
              WHERE user_id=? AND title REGEXP ? AND (JSON_CONTAINS(tag->'$', ?) OR '@@@***###$$$&&&leazerfspace20220509'=?) ORDER BY update_time DESC`,
  findPPTById: 'SELECT * FROM ppt WHERE user_id=? AND id=?'
}
